﻿using System;
using log4net;

namespace MathematicallySafe.Base
{
    public class Log4NetLog<T> : ILog<T>
    {
        private readonly ILog _log;

        public Log4NetLog()
        {
            _log = LogManager.GetLogger(typeof (T));
            log4net.Config.XmlConfigurator.Configure();
        }

        public void Info(object message)
        {
            _log.Info(message);
        }

        public void Error(object message)
        {
            _log.Error(message);
        }

        public void Debug(object message)
        {
            _log.Debug(message);
        }

        public void Fatal(object message, Exception e)
        {
            _log.Fatal(message, e);
        }
    }
}


